package ru.vboxdc.actions;

import com.opensymphony.xwork2.ActionSupport;
import ru.vboxdc.ObjectPool;
import ru.vboxdc.domain.HostServer;
import ru.vboxdc.domain.VirtualMachine;

import java.util.Set;
import java.util.List;

/**
 * User: lelon
 * Date: 01.02.2009
 * Time: 3:12:05
 */

public class HostServerInfo extends ActionSupport {
    private int id;
    private HostServer hostServer;
    private List<VirtualMachine> virtualMachines;


    public String execute () {

            hostServer =ObjectPool.get().getHostServer(id);

            if (hostServer==null) addActionError(String.format(getText("HostServer.not.found"), id));

        return SUCCESS;
    }


    public void setId(int id) {
        this.id = id;
    }

    public HostServer getHostServer() {
        return hostServer;
    }

}
